﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace diploma.core.data.objects
{
    public class Term : DataObject
    {
        private List<string> variants;
        public Term(long _id, string _title)
            : base(_id, _title)
        {
            variants = new List<string>();
        }

        public string Title
        {
            get
            {
                return textField;
            }
        }

        public List<string> Variants
        {
            get
            {
                return variants;
            }
        }

        public void SetTitle(string _value, bool _innerDataSourceChanges)
        {
            textField = _value;
            if (!_innerDataSourceChanges)
            {
                DataRouter.Instance.Act(DataActions.update, this.Type, this);
            }
        }

        public void SetTitle(string _value)
        {
            SetTitle(_value, false);
        }

        public override DataObjectTypes Type
        {
            get
            {
                return DataObjectTypes.Term;
            }
        }
    }
}
